Show:

Q ticker Class

Ticker that scrolls its contents with various speeds and pauses

Constructor

Q ticker

(
  • $options
)

Parameters:

  • $options Array

    An associative array of fields, possibly including:

    "content" => string The content of the ticker. The first top-level element should contain sub-elements, and their sizes determine where the ticker would pause between automatically scrolling. The ticker animates by scrolling its inner contents.

    "vertical" => bool Defaults to true. If false, the ticker scrolls horizontally.

    "speed" => integer The scrolling speed. This is the number of items that would scroll by in 1 second, if there were no pauses. When the speed is positive, vertical tickers scroll down, and horizontal tickers scroll to the right. New content seems to come in from the bottom (for vertical tickers) or right (for horizontal tickers) as the ticker scrolls. The element inside the ticker will start out aligned with the top side of the ticker (for vertical tickers), or the left side of the ticker (for horizontal tickers). When the speed is negative, all this faces the other way.

    "pause_ms" => int Defaults to 2000. This is the number of milliseconds to wait after each second-level element of $content is automatically scrolled completely into view.

    "pause_ms_min" => int If set, then the number of milliseconds to pause is a random integer between $pause_ms_min and $pause_ms.

    "scrollbars" => bool Defaults to true. If true, shows scrollbars, otherwise doesn't. (Note: this will let the user know how much content is left, and be able to see it before it would automatically scroll into view.)

    "scrollbars_pause_ms" => int Defaults to 500. The ticker pauses its automatic scrolling when the user starts using the scrollbars. This is the number of milliseconds to wait until resuming the automatic scrolling.

    "anim_ms" => int Defaults to 100. This is the number of milliseconds between calls to autoScroll.

    "initial_scroll_mode" => string Defaults to 'auto'. This is the mode that scrolling starts out in. Possible values are 'auto' and 'paused'.

    "ease" => string Optional. If set, specifies the name of the ease function

Item Index